package sunwin.yoms.service.resource;

import jodd.datetime.JDateTime;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import sunwin.yoms.service.rmiServer.ISubscribeOrder;

import java.util.Date;

/**
 * Created by Jao on 15/11/30.
 */
@Component("orderServer")
public class OrderService implements ISubscribeOrder {
    @Autowired
    private SubscribeOrderService subscribeOrderService;

    @Override
    public void cancelSubscribe(int uid, int sid, JDateTime dateTime) throws Exception {
        subscribeOrderService.cancelSubscribe(uid, sid, dateTime);
    }

    @Override
    public void cancelSubscribe(int sid, Date date, long timeSpanLong) throws Exception {
        subscribeOrderService.cancelSubscribe(sid, date, timeSpanLong);
    }

    @Override
    public void cancelSubscribe(int uid, int sid, Date date, long timeSpanLong) throws Exception {
        subscribeOrderService.cancelSubscribe(uid, sid, date, timeSpanLong);
    }

    @Override
    public void batchCancelSubscribe(int uid, int sid, JDateTime startDate, JDateTime endDate) throws Exception {
        subscribeOrderService.batchCancelSubscribe(uid, sid, startDate, endDate);
    }

    @Override
    public void cancelSubscribeDay(int uid, int sid, JDateTime date) throws Exception {
        subscribeOrderService.cancelSubscribe(uid, sid, date);
    }
}
